#define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>

void swap1(int* a, int* b)
{
	int t = *a;
	*a = *b;
	*b = t;
}

void swap2(int* a, int* b)
{
	*a = *a + *b;
	*b = *a - *b;
	*a = *a - *b;
}

void swap3(int* a, int* b)
{
	*a = *a ^ *b;
	*b = *a ^ *b;
	*a = *a ^ *b;
}

int main()
{
	int a1 = 10, b1 = 20;
	int a2 = 11, b2 = 21;
	int a3 = 12, b3 = 22;
	swap1(&a1, &b1);
	swap2(&a2, &b2);
	swap3(&a3, &b3);
	printf("a1=%d,b1=%d\n", a1, b1);
	printf("a2=%d,b2=%d\n", a2, b2);
	printf("a3=%d,b3=%d\n", a3, b3);
	return 0;
}